<template>
  <!-- 保付代理申请页 -->
  <view class="content">
    <!--申请人信息  -->
    <uni-section title="申请人信息" type="line">
      <view class="example">
        <!--  -->
        <uni-forms
          ref="baseForm"
          :modelValue="baseFormData"
          label-position="top"
          label-width="100px"
        >
          <uni-forms-item label="申请人姓名" required>
            <uni-easyinput
              v-model="baseFormData.name"
              placeholder="请输入申请人姓名"
            />
          </uni-forms-item>
          <uni-forms-item label="企业名称" required>
            <uni-easyinput
              v-model="baseFormData.age"
              placeholder="请输入企业名称"
            />
          </uni-forms-item>
          <uni-forms-item label="企业地址" required>
            <uni-easyinput
              v-model="baseFormData.age"
              placeholder="请输入企业地址"
            />
          </uni-forms-item>
          <uni-forms-item label="联系电话" required>
            <uni-easyinput
              v-model="baseFormData.age"
              placeholder="请输入联系电话"
            />
          </uni-forms-item>
          <!-- <uni-forms-item label="性别" required>
            <uni-data-checkbox v-model="baseFormData.sex" :localdata="sexs" />
          </uni-forms-item> -->
          <uni-forms-item label="信用证明">
            <uni-easyinput
              type="textarea"
              v-model="baseFormData.introduction"
              placeholder="请输入信用证明"
            />
          </uni-forms-item>
        </uni-forms>
        <!--  -->
      </view>
    </uni-section>
    <!-- 融资申请信息 -->
    <uni-section title="融资申请信息" type="line">
      <view class="example">
        <!--  -->
        <uni-forms
          ref="baseForm"
          :modelValue="baseFormData"
          label-position="top"
          label-width="100px"
        >
          <uni-forms-item label="木耳数量" required>
            <uni-easyinput
              v-model="baseFormData.name"
              placeholder="请输入木耳数量"
            />
          </uni-forms-item>
          <uni-forms-item label="木耳品质" required>
            <uni-data-checkbox v-model="baseFormData.sex" :localdata="sexs" />
          </uni-forms-item>
          <uni-forms-item label="木耳单价" required>
            <uni-easyinput
              v-model="baseFormData.age"
              placeholder="请输入木耳单价"
            />
          </uni-forms-item>
          <uni-forms-item label="融资金额" required>
            <uni-easyinput
              v-model="baseFormData.age"
              placeholder="请输入融资金额"
            />
          </uni-forms-item>
          <uni-forms-item label="融资期限" required>
            <uni-easyinput
              v-model="baseFormData.age"
              placeholder="请输入融资期限"
            />
          </uni-forms-item>

          <uni-forms-item label="还款方式">
            <uni-easyinput
              v-model="baseFormData.introduction"
              placeholder="请输入还款方式"
            />
          </uni-forms-item>
        </uni-forms>
        <!--  -->
      </view>
    </uni-section>
    <!--  -->
    <uni-section title="备注" type="line">
      <view class="example">
        <!--  -->
        <uni-forms
          ref="baseForm"
          :modelValue="baseFormData"
          label-position="top"
          label-width="100px"
        >
          <uni-forms-item label="备注">
            <uni-easyinput
              type="textarea"
              v-model="baseFormData.introduction"
              placeholder="请输入..."
            />
          </uni-forms-item>
        </uni-forms>
        <!--  -->
      </view>
    </uni-section>
    <button type="primary" @click="submit">提交申请</button>
  </view>
</template>

<script>
export default {
  data() {
    return {
      baseFormData: {
        name: "",
        age: "",
        introduction: "",
        sex: 2,
        hobby: [5],
        datetimesingle: 1627529992399,
      },
      sexs: [
        {
          text: "一级品",
          value: 0,
        },
        {
          text: "二级品",
          value: 1,
        },
        {
          text: "三级品",
          value: 2,
        },
        {
          text: "四级品",
          value: 2,
        },
        {
          text: "外等级",
          value: 2,
        }
      ],
    };
  },
  methods:{
	  // submit(ref) {
		//   this.$refs.form.validate().then(res=>{
		//   		uni.showToast({
		//   		  title: `提交成功`,
		//   		});
		//   		setTimeout(() => {
		//   		  uni.navigateBack({
		//   		    delta: 1, // 返回的页面数，1 表示返回上一页，2 表示返回上两页，依此类推
		//   		  });
		//   		}, 1000); // 设置延迟时间为 2000 毫秒（2秒）
		//   	}).catch(err =>{
		//   		console.log('表单错误信息：', err);
		// )
	  // },
  }
};
</script>

<style lang="scss">
.content {
  background: #fff;
  padding: 20rpx;
  box-sizing: border-box;
  .example{
    padding: 20rpx;
    box-sizing: border-box;
  }
}
</style>